Prior art exists that relates to programmatically determining which drive in a system is the boot drive. For example, this is often done by a boot program such as the
There are several examples of methodologies on the internet that allow a user or implementer to programmatically determine the boot drive in a multi-drive computer system. The web site toward dot com, subdirectory cfsrexx/os2-mag/9701.htm contains a technical article showing one such methodology for the OS2 operating system. This article describes an application programming interface call of GetBootDrive( ). This API call supersedes a previous API call of DosQuerySysinfo( ). The older API call of DosQuerySysinfo( ) returned an ordinal number which can be converted into its corresponding drive letter (1-26=A-Z). The new API call of GetBootDrive( ) returns the drive letter in upper case of the drive that booted the operating system.
While the methodology described in the above article will identify the boot drive in the computer system is has two shortcomings addressed by aspects of the present disclosure. The article does not address the issue of the bus interface a boot drive or any other storage device is attached to either externally or internally to the computer system. The methodology in the article is targeted specifically to the OS2 operating system and not easily transferable to other operating systems. The present disclosure recognizes certain commonalities across a wide variety of operating systems including Windows, Unix, Linux, and MAC/OS which is a shell residing on top of Unix.
The article also makes use of batch files to determine the boot drive from a plurality of drives connected to the computer system. A batch file is a text file containing a series of commands intended to be executed by the command interpreter. Batch files are used across all popular operating systems such as Windows, MAC/OS. Batch files in Unix, and Linux based operating systems are normally referred to as shell scripts. When a batch file is run, the shell program that runs on top of the operating system providing an interface for the user (usually COMMAND.COM or cmd.exe) reads the file and executes its commands, normally line-by-line. Batch files are useful for running a sequence of executables automatically and are often used by system administrators to automate tedious processes.
The article on this web site provides examples of batch files that obtain the assigned boot file indicator, which is normally a letter, and places it into a variable that can be accessed by an application program or by the computer user. These batch file examples cover such operating systems as DOS, OS/2, Windows NT/4, Windows XP. The example shown for Windows XP gathers some additional information such as the boot disk indicator which is normally a number, the boot drive indicator which is normally a letter, and the \name of the boot partition contained on the boot drive.
Again, this article does not address the physical interface to which the boot drive is connected.